" 缩进
setlocal tabstop=2 shiftwidth=2 sts=2
noremap <buffer> <M-f> a() => {}<esc>i<cr><esc>ko
inoremap <buffer> <M-f> <esc>a() => {}<esc>i<cr><esc>ko
nnoremap <buffer> <TAB> bi<<esc>ea><esc>F<vf>yf>pF<a/<esc>F<

" vimscript编写的,快速删除html属性功能
" du 也会删除空格
onoremap <buffer> u :<C-u>call SelectAttr(1)<CR>
" dU 不会删除空格
onoremap <buffer> U :<C-u>call SelectAttr(0)<CR>

nnoremap <buffer> <M-a> $^i<a href=""><ESC>$a</a><Esc>^f>lvf<hy^f"pj
nnoremap <buffer> <M-d> $^i<div><ESC>$a</div><Esc>

" inoremap <buffer> <C-l> <ESC>/><<CR>:nohlsearch<CR>a

function! Html_Search_word() abort
    if search('><', 'w')
        return
    endif
endfunction
nnoremap <buffer> <leader><TAB> :call Html_Search_word()<CR>

